#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;

const int kMaxN = 5010;
double f[kMaxN][kMaxN];
int p[kMaxN];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }

  double ans = -1e9, d = 0;
  for (int i = 1; i <= n; i++) {
    fill(f[i], f[i] + n + 1, -1e9);
    d = d * 0.9 + 1;
    for (int j = i; j <= n; j++) {
      f[i][j] = max(f[i][j - 1], f[i - 1][j - 1] * 0.9 + p[j]);
      ans = max(ans, f[i][j] / d - 1200.0 / sqrt(i));
    }
  }
  cout << fixed << setprecision(10) << ans << "\n";
  return 0;
}